import React, { PureComponent } from 'react'
import { View, Text } from 'react-native'
import { ButtonGroup } from 'react-native-elements'
import PropTypes from 'prop-types'
import screen from '../../utils/screen'

export default class extends PureComponent {
  static propTypes = {
    onPress: PropTypes.func,
    buttons: PropTypes.any,
    selectedIndex: PropTypes.any,
  }
  render() {
    const { onPress, buttons, selectedIndex } = this.props;
    return (
      <ButtonGroup
        onPress={onPress}
        selectedIndex={selectedIndex}
        textStyle={{ fontSize: screen.pxToDp(32), color: '#626262' }}
        selectedTextStyle={{ color: 'white' }}
        containerBorderRadius={0}
        innerBorderStyle={{ width: 0, color: 'white' }}
        containerStyle={{
          borderRadius: 0,
          borderColor: 'blue',
          backgroundColor: 'white',
        }}
        selectedBackgroundColor="#007eff"
        buttons={buttons}
      />
    )
  }
}
